import {defineStore} from "pinia";
import {darkTheme} from 'naive-ui'


export const useThemeStore = defineStore('sys-theme', {
    persist: true,
    state: () => ({
        dark: false
    }),
    getters: {
        getTheme(state) {
            return state.dark ? darkTheme : undefined
        }
    },
    actions: {
        setDark(dark) {
            this.dark = dark
        }
    }
})